/* Powered By www.cjAsp.com QQ：115050021 */

(function($){
var cj = {
	t: [],
	l: [],
	axis: 1000,
	ie6: (/msie 6/i).test(navigator.userAgent),
	ie: (/msie/i).test(navigator.userAgent),
	ff: (/firefox/i).test(navigator.userAgent),
	opera: (/opera/i).test(navigator.userAgent),
	is: function(v){
		return (v && v == 1) ? '<font color=blue>是</font>' : '<font color=green>否</font>';
	},
	rand: function(num) {
		var s = 'qwertyuiopasdfghjklmnbvcxz1234567890'.split(''), r = [];
		for (var i = 0; i < num - 1; i++) {
			r.push(s[Math.floor(Math.random() * 35)]);
		}
		return r.join('');
	},
	num: function(v){
		return v ? v : 0;
	},
	left: function(str, n){
		if(!str || str.length < 1) return;
		var s = str.replace(/\*/g, " ").replace(/[^\x00-\xff]/g, "**");
		s = s.slice(0, n).replace(/\*\*/g, " ").replace(/\*/g, "").length;
		return str.slice(0, s);
	},
	int: function(a, b){
		if(!a) return b;
		a = parseInt(a);
		if(isNaN(a) || a < (!b ? b = 1 : b)) a = b;
		return a;
	}
};
window.cj = cj.prototype = cj;
if(cj.ff){
	function Handler(e){
		e = $.event.fix(e);e.type="mousewheel";e["originalEvent"]["wheelDelta"]=-(e["originalEvent"]["detail"]*20);$.event.handle.call(this,e);
	}
	$.event.special.mousewheel = {
		setup: function(){this.addEventListener("DOMMouseScroll", Handler, true);},
		teardown: function(){this.removeEventListener("DOMMouseScroll", Handler, true);}
	};
}
if(cj.ie6) {
	document.execCommand("BackgroundImageCache", false, true);
}
$.extend({
cookie: function(name, value, options){
	if(typeof value !== "undefined"){
		options = options || {};
		if(value === null){ value = ''; options.expires = -1;}
		var expires = '';
		if(options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
			var date;
			if (typeof options.expires == 'number') {
				date = new Date();
				date.setTime(date.getTime() + (options.expires * 24 * 3600 * 1000));
			}else date = options.expires;
			expires = '; expires=' + date.toUTCString();
		}
		var path = options.path ? '; path=' + (options.path) : '',
		domain = options.domain ? '; domain=' + (options.domain) : '', secure = options.secure ? '; secure' : '';
		return document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
	} else {
		var cookieValue = null;
		if(document.cookie && document.cookie != ''){
			var cookies = document.cookie.split(';');
			for(var i=0;i<cookies.length;i++){
				var cookie = $.trim(cookies[i]);
				if (cookie.substring(0, name.length + 1) == (name + '=')){
					cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
					break;
				}
			}
		}
		return cookieValue;
	}
},
frame: function(opts){
	var opt = $.extend({
		src: "return false",
		id: cj.rand(8),
		w: "99.5%",
		h: 500
	}, opts || {});
	return this.each(function(){
		var fn = "iframe_" + opt.id, htm = $('<iframe src="' + opt.src + '" id="' + fn + '" name="' + fn + '" frameborder="0" scrolling="auto">');
		return htm.width(opt.w).on('load', function(){
			try {
				var sel = htm.contents();
				$(this.contentWindow).on('scroll', function(){
					htm.animate({height: sel.height()}, 300);
				});
				htm.animate({height: sel.height()}, 300);
			} catch(a){htm.height(opt.h)}
		});
	});
}
});
$.fn.extend({
	autoHeight: function(xh){
		xh = xh || 100;
		return this.each(function(){
			var th = $(this), h = th.height(), sh = this.scrollHeight, mh = sh < xh ? xh : sh, ah = sh >= h ? sh : mh;
			th.animate({ height: ah }, 600);
		});
	},
	mousewheel: function(fn){return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");},
	unmousewheel: function(fn){return this.unbind("mousewheel", fn);},
	setCaret: function(){
		if($(this)[0].createTextRange){
			var initCaret = function(){$(this)[0].caretPos = document.selection.createRange().duplicate();};
			$(this).click(initCaret).select(initCaret).keyup(initCaret);
		}
	},
	autoScroll: function (opts) {
		var opt = $.extend({
			speed: 1000, //卷动速度，数值越大，速度越慢（毫秒）
			time: 3, //滚动的时间间隔（秒）
			num: 3, //每次滚动数量
			fx: 1, //方向 0上 1左
			child: "img" //要查找的子元素
		}, opts || {}), num = opt.num;
		return this.each(function () {
			var sel = $(this), cd = opt.child, chi = sel.find(cd), len = chi.size();
			if (len <= num) return;
			var goin = null, chw, fx, fxs, speed = isNaN(parseInt(opt.speed,10)) ? 500 : opt.speed,
			time = isNaN(parseInt(opt.time)) ? 3 : opt.time;
			if(len % num != 0) {
				sel.find(cd + ":lt(" + (parseInt(num * 2) - len) + ")").clone(false,false).appendTo(sel);
				chi = sel.find(cd);
				len = chi.size();
			}
			chw = chi.outerWidth(true);
			if (opt.fx == 1) {
				sel.css({width: len * chw});
				fx = {marginLeft: -(chw * num)};
				fxs = {marginLeft: 0};
			} else {
				var ch = chi.outerHeight(true);
				sel.css({width: chw * num, height: Math.ceil(len / num) * ch});
				fx = {marginTop: -ch};
				fxs = {marginTop: 0};
			}
			var autoPlay = function () {
				sel.animate(fx, speed, function () {
					$(this).css(fxs).find(cd + ":lt(" + num + ")").appendTo(sel);
				});
			};
			sel.hover(function () {
				clearInterval(goin);
			}, function () {
				goin = setInterval(autoPlay, time * 1000);
			}).mouseout();
		});
	},
	slideItem: function(opts){
		var opt = $.extend({
			ans: "tabcon", //响应区域的父容器对象
			cur: "current", //鼠标的CSS样式
			delay: 200, //鼠标旋停延迟时间 ms
			index: 0 //开始索引的地方 从0起算
		}, opts || {}), ans = typeof(opt.ans) == "object" && opt.ans[0] ? opt.ans : $(opt.ans);
		if(!ans[0]) return;
		var th = this.find(">:parent"), sets = ans.find(">:parent");
		return th.each(function(i){
			var initate = null;
			if(i !== opt.index){
				sets.eq(i).hide(0);
				th.not(th.eq(opt.index).addClass(opt.cur)).removeClass(opt.cur);
			}
			$(this).hover(
				function(){
					th.not($(this).addClass(opt.cur)).removeClass(opt.cur);
					initate = setTimeout(function(){
						sets.not(sets.eq(i).fadeIn(300)).fadeOut(0);
					}, opt.delay);
				},
				function(){
					clearTimeout(initate);
				}
			);
		});
	},
	flash: function(opts){
		var opt = $.extend({
			stop: 5, //播放时间
			bottom: 10, //按钮离底部尺寸
			opacity: 1, //按钮透明度
			speed: 500, //动画完成时间
			delay: 260, //鼠标延迟ms
			index: 1, //开始索引的地方 从1起算
			imgButton: false, //按钮是否是图片样式
			imgCss: 'flash_img', //图片展示DIV的CSS
			buttonCss: 'flash_m', //按钮DIV的CSS
			focusCss: "flashCur" //焦点按钮的CSS
		}, opts || {}), sel = this.selector.replace(/[^\w-]/i, "");
		return this.each(function(){
			var n = opt.index - 1 || 0, initate = null, delays = null, htm = '', self = $(this);
			self.find("a").each(function(i){
				var sele = $(this);
				if (i !== n) sele.hide();
				htm += '<a href="' + sele.attr("href") + '" title="' + sele.attr("title") + '" target="_blank">';
				!opt.imgButton ? htm += i + 1 : htm += sele.html();
				htm += '<\/a>';
			});
			var button = $('<div class="' + opt.buttonCss + '"></div>').html(htm).css({top: (self.height() - 28 - opt.bottom)}),
			image = $('<div class="' + opt.imgCss + '"></div>').html(self.html()),
			buttons = button.find("a"), images = image.find("a"),
			play = function(){
				buttons.not(buttons.eq(n).addClass(opt.focusCss)).removeClass(opt.focusCss);
				images.not(images.eq(n).fadeIn(opt.speed)).hide(0);
				++ n;
				n = n >= images.size() ? 0 : n;
				initate = setTimeout(play, opt.stop * 1000);
			};
			self.html(image);
			image.after(button);
			images.each(function(i){
				$(this).hover(function(){
					clearTimeout(initate);
				}, function(){
					n = i;
					play();
				}).find("img").css({ width: self.width(), height: self.height()});
			});
			buttons.each(function(i){
				if(opt.imgButton) $(this).css({opacity: opt.opacity});
				$(this).hover(function(){
					clearTimeout(initate);
					delays = setTimeout(function(){
						buttons.not($(this).addClass(opt.focusCss)).removeClass(opt.focusCss);
						images.not(images.eq(i).fadeIn(opt.speed)).hide(0);
					}, opt.delay);
				}, function(){
					n = i;
					clearTimeout(delays);
					if(!image.mouseleave) play();
				});
			});
			play();
		});
	},
	tid: function(){
		var a = $(this), b = cj.rand(10), c = a.attr("data-sole");
		if(!c) a.attr("data-sole", b);
		return c ? c : b;
	},
	div: function(opts) {
		var opt = $.extend({
			t: "请选择",
			c: "",
			w: 500,
			top: false,
			clo: null
		}, opts || {}), title = opt.t,
		ti = '<span class="closebox" title="关闭">×</span><span class="tosize" title="最小化/还原">__</span><strong>' + title + '</strong>',
		win = $(window), wid = win.width();
		return this.each(function(){
			var sel = $(this), tid = sel.tid() + "_drag_box", t = cj.t[tid], l = cj.l[tid],
			box = $("#" + tid), you = false, os = sel.offset(),
			clo = function(){ box.fadeOut(300, function(){ $(this).remove() })};
			t = t ? t : (opt.top ? win.scrollTop() + 10 : os.top + sel.height());
			l = l ? l : ((os.left + opt.w + 30) < wid ? os.left : wid - opt.w - 30);
			l = l < 0 ? 0 : l;
			if (!box[0]) {
				box = $('<div class="box" id="' + tid + '"><div class="box_t" data-title="鼠标:左键拖动,右键关闭">' + ti + '</div><div class="box_c"></div>');
				$("body").append(box);
				box.hide(0).css({
					top: t,
					left: l,
					width: opt.w,
					zIndex: ++cj.axis
				});
				you = true;
			}
			if(opt.clo) return clo();
			var box_t = box.find(".box_t"), con = box.find(".box_c");
			if(you){
				box_t.contextmenu(function(){ clo();return false;});
				box.drag(box_t);
			}
			box_t.html(ti);
			con.html(opt.c);
			box.fadeIn(300);
			var strong = box_t.find("strong");
			box_t.find(".closebox").click(function(){clo()})
			.next(".tosize").toggle(function(){
				$(this).text("□");
				con.slideUp(300, function(){
					box.animate({width:120}, 300);
					strong.text((title).slice(0,3) + "..");
				});
			},
			function(){
				$(this).text("__");
				box.animate({width:opt.w}, 300, function(){
					strong.text(title);
					con.slideDown(300)
				});
			});
		});
	},
	insert: function(str){
		var tc = this[0];
		if(tc.createTextRange && tc.caretPos){
			var pos = tc.caretPos;
			pos.text = pos.text.charAt(pos.text.length-1) == '' ? str+'' : str;
		}else if(tc.setSelectionRange){
			var ranStart = tc.selectionStart;
			tc.value = tc.value.substring(0, ranStart) + str + tc.value.substring(tc.selectionEnd);
			tc.focus();
			tc.setSelectionRange(ranStart + str.length, ranStart + str.length);
			tc.blur();
		}else{
			tc.value += str;
		}
	},
	clew: function(con, w){
		var clewBox = $("#clewBox");
		if(!clewBox[0]) clewBox = $('<div id="clewBox"><\/div>').hide(0).prependTo("body");
		return this.each(function(){
			var l = ($(window).width() - (w || 400)) / 2, t = ($(window).scrollTop()) + 100;
			if (clewBox.is(":hidden")){
				clewBox.css({left: l, top: t, opacity: 0}).html(String(con)).show(0).animate({top: "+=30", opacity: 1},400)
				.animate({top: t + 30}, 3000).animate({top: "-=30", opacity: 0},500, function(){$(this).hide(0)});
			} else clewBox.stop(true,true).html("").removeAttr("style").hide(0).clew(con, w);
		});
	},
	drag: function(opt){
		return this.each(function(){
			var obj = null, sel = $(this), tid = sel.attr("id") || sel.tid(), t = 0, l = 0, w = sel.width(),
			take = typeof(opt) === "object" && opt[0] ? opt : (typeof(opt) === "string" ? sel.find(opt) : sel);
			sel.width(w);
			take.css({cursor: "move", MozUserSelect: "none"}).attr("unselectable", "no").on({
				mousedown: function(e){
					$.isDrag = true;
					obj = sel;
					obj.css({position: "absolute", zIndex: ++cj.axis});
					t = e.pageY - (cj.t[tid] = obj.offset().top);
					l = e.pageX - (cj.l[tid] = obj.offset().left);
					if(this.setCapture) this.setCapture();
					e.preventDefault();
				},
				selectstart: function(){return false}
			});
			$(document).mousemove(function(e){
				$.isDrag = false;
				if(obj) obj.css({top: e.pageY - t, left: e.pageX - l });
			}).mouseup(function(e){
				obj = null;
				if(this.releaseCapture) this.releaseCapture();
			});
		});
	},
	cjTitle: function(){
		return this.each(function(){
			var div = $("#cjAspFloatTitle"), goin = null;
			if(!div[0]){
				div = $('<div id="cjAspFloatTitle" class="floattitle"><\/div>');
				div.css("z-index", ++cj.axis).appendTo("body");
			}
			$(this).find("[data-title]").on({
				mouseenter: function(e){
					var title = $(this).attr("data-title");
					if( title ) {
						goin = setTimeout(function(){
							div.html(title.replace(/[\n\r]+|\\n/g, "<br>"));
							var win = $(window), wt = win.scrollTop(), ww = win.width() - 30, wh = win.height() - 30,
							dw = div.width(), h = div.height(), w = dw > 400 ? 400 : dw, l = e.clientX + 15,
							t = e.clientY + wt + 15;
							l = (l + w) >= ww ? (ww - w) : l; t = (t + h) >= (wt + wh) ? (t - h - 40) : t;
							div.css({left: l, top: t, zIndex: ++cj.axis}).fadeIn(50);
						}, 400);
					}
				},
				mouseleave: function(){clearTimeout(goin);div.fadeOut(0);}
			});
		});
	},
	editBook: function() {
		return this.each(function(){
			var self = $(this), bid = cj.int(self.attr("data-book-id")),
				cid = self.attr("data-class-id"),
				htm = '<span class="book_re cur" data-title="回复">回复</span> <span class="book_edit cur" data-title="修改">修改</span> ',
			box = function(src, t){
				var fra = $.frame({src: "book.asp?" + (src ? src : ''), w: 800, h: 350});
				return self.div({t: t, c: fra, w: 810, top: true});
			};
			if(bid && bid > 0) {
				self.prepend(htm).find('span.book_re').click(function(){
					box('id=' + bid, '回复主题');
				});
				self.find('span.book_edit').click(function(){
					box('q=2&id=' + bid, '修改主题');
				});
			}
			if(cid) {
				$('<span class="book_new cur r" data-title="发表新主题">发表</span>').prependTo(self).click(function(){
					box('classId=' + cj.int(cid), '发表新主题');
				});
			}
		});
	},
	testForm: function() {
		return this.each(function(){
			$(this).click(function(){
				var word = $('textarea[name="bookBanWord"]'), val = word.val(), i = 0, j, n;
				if(val && val.length > 0) {
					n = val.split("\n");
					if (n.length == 0) return true;
					for (;j = n[i++];) {
						try {
							new RegExp(j);
						} catch(e) {
							word.clew('要过滤的关键词错误：' + e.message).focus();
							return false;
						}
					}
				}
			});
		});
	},
	bookUrl: function() {
		return this.each(function() {
			var sel = $(this), txt = sel.text(), url = sel.attr("url"), a = '';
			if(url) sel.replaceWith('<a href="./gotourl.asp?url=' + decodeURIComponent(url) + '" target="_blank">' + txt + '</a>');
		});
	},
	showPic: function(opts) {
		var opt = $.extend({
			fill: 10,
			high: 28
		}, opts || {});
		var imgResize = function(mw, mh, iw, ih){
			if(iw / ih >= mw / mh && iw > mw){ih = (ih * mw) / iw;iw = mw;}
			else if(ih > mh){iw = (iw * mh) / ih;ih = mh;}
			if(iw < 220){ih = (220 / iw) * ih;iw = 220;}
			return { w: iw, h: ih}
		};
		return this.each(function(){
			var self = $(this), image = self.find("img"), high = isNaN(opt.high) ? 28 : opt.high,
			fill = isNaN(opt.fill) ? 10 : opt.fill, fill2 = fill * 2;
			//if(image.width() > 300) image.css("width", 300);
			image.parent().each(function(){
				if($(this).attr("tagName") == "A") $(this).attr("href","javascript:void(0)").removeAttr("target").unbind();
			});
			image.unbind().css("cursor","pointer").click(function(e){
				var win_w = $(window).width(), win_h = $(window).height(),
				win_t = $(window).scrollTop(), doc_h = $(document).height(), th = $(this);
				var image = new Image();image.src = this.src;
				var img = image.src, temp = imgResize(win_w - fill2, win_h - fill2 - high, image.width, image.height);
				img_w = temp.w; img_h = temp.h;
				var div_w = img_w + fill2, div_h = img_h + fill2 + high, div_l = (win_w - img_w) / 2 - fill,
				div_t = (win_h - img_h) / 2 + win_t - high;
				var pic_bg = $('<div id="pic_bg"></div>');
				pic_bg.css({opacity: 0.4, width: win_w, height: doc_h, zIndex: cj.axis}).appendTo("body");
				if(cj.ie6) pic_bg.append('<iframe border="0" frameborder="0" style="filter:alpha(opacity=0);position:absolute;top:0;left:0;width:'+win_w+'px;height:'+doc_h+'px;" src="javascript:false;"><\/iframe>');
				var pic_box = $('<div id="pic_box"></div>');
				pic_box.css({top: div_t, left: div_l, width: div_w, height: div_h, zIndex: ++cj.axis})
				.insertAfter(pic_bg.fadeIn(700)).append(
					'<div id="pic_t"><a id="pic_close" href="javascript:void(0)" title="\u5173\u95ed"></a>'+
					'<a id="pic_newwin" href="'+img+'" target="_blank" title="\u65b0\u7a97\u53e3\u6253\u5f00"></a>\u6eda\u8f6e'+
					'\u7f29\u653e\u56fe\u7247\u002c\u5355\u51fb\u56fe\u7247\u0028\u62d6\u52a8\u002f\u5173\u95ed\u005b\u0045'+
					'\u0073\u0063\u005d\u0029</div><div id="pic_c"><img id="pic_img" width="'+img_w+'" src="'+img+'"></div>')
				.fadeIn(600).find("img").mousewheel( function(e){
					var l, t, d_w, d_h, w = $(this).width(), h = $(this).height(),
					z = (-e["originalEvent"]["wheelDelta"]) / ($.browser.opera ? 24 : 12);
					w += w/z; h += h/z; l = (win_w - w)/2 - fill;
					t = (win_h - h)/2 + win_t - high; d_w = w + fill2; d_h = h + fill2 + high;
					if(w > 200 || z > 0){
						$(this).css({width: w, height: h});
						if(d_w > 250 && d_h > 200) pic_box.css({width: d_w, height: d_h, left: l, top: t});
					}
					e.preventDefault();
				}).click(function(){if($.noop.isDrag)cop()});
				var cop = function(){$("#pic_box,#pic_bg").fadeOut(600, function(){$(this).remove()});};
				pic_box.drag({take:$("#pic_img")}).find("#pic_close").click(function(){cop()});
				$(document).keydown(function(e){if(e.which == 27) cop();});
			});
		});
	},
	sortStr: function(opts){ //表格排序
		var opt = $.extend({
			patt: {
				date: new RegExp("^\\s*(\\d{4}-\\d{1,2}-\\d{1,2}.*?|^\\d{1,2}/\\d{1,2}/\\d{4}).*?"),
				size: new RegExp("^\\s*([\\d.]+)\\s*(GB|MB|KB|B)+", "i"),
				num: new RegExp("^\\s*([\\d.-])+"),
				price: new RegExp("^\\s*[$|￥]+\\s*([\\d.-]+)+"),
				ext: new RegExp("\\.([a-z]+)+\\s*$", "i"),
				str: new RegExp("[\\S\\s]*?")
			}
		}, opts || {}),
		sel = this,
		tbody = sel.find("tbody"),
		thead = sel.find("thead th"),
		thType = [],
		pars = function (v, n){
			switch (thType[n]) {
			case "num":
				return parseFloat(v) || 0;
			case "size":
				var val = 0;
				v.replace(opt.patt["size"], function(a, b, c){
					var s = {"gb": 1024000000, "mb": 1024000, "kb": 1024};
					return (c && b) ? val = parseFloat(b) * s[c.toLowerCase()] : val = parseFloat(b) || 0;
				});
				return val;
			case "price":
				return parseFloat(v.replace(opt.patt["price"], "$1"));
			case "date":
				return Date.parse(v.replace(/ |-/g, "/")) || 0;
			default:
				return v.toString();
			}
		},
		textCon = function(a) {
			return $.browser.mozilla ? a.textContent : a.innerText;
		},
		setSort = function (n) {
			return function (a, b) {
				var v1 = textCon(a.cells[n]);
				var v2 = textCon(b.cells[n]);
				if (thType[n] !== "str") {
					v1 = pars(v1, n);
					v2 = pars(v2, n);
					return v1 == v2 ? 0 : (v1 < v2 ? -1 : 1);
				} else return v1.localeCompare(v2);
			};
		};
		tbody.find("tr:eq(0) td").each(function(n){
			var type = "str", v = $(this).text();
			for (var i in opt.patt) {
				if (opt.patt[i].test(v)) {
					type = i;
					break;
				}
			}
			thType[n] = type;
		});
		return thead.each(function(n){
			$(this).click(function () {
				var th = $(this), arr = [], row = tbody.find("tr");
				$.each(row, function (i) {
					arr[i] = row[i];
				});
				if (thead.data("mark") !== n) {
					arr.sort(setSort(n));
					thead.data("mark", n);
				} else arr.reverse();
				$.each(arr, function (i) {
					tbody.append(arr[i]);
				});
			});
		});
	}
});

$(document).ready(function(){
	$(this).cjTitle();
	$('.art_c').showPic().find("table").sortStr();
	$(".cj_book,.new_book").editBook();
	$("span.book_url").bookUrl();
$(this)
	//返回
	.on('click', '.back_page', function() {
		history.back();
	})
});

})(jQuery);
function loadEdit(id){
	(function($){
		KindEditor.ready(function (K) {
			$.editor = K.create(id, {
				//themeType: 'simple',
				allowImageUpload: false, //不显示上传图片标签
				filterMode: true, //过滤HTML代码
				wellFormatMode: false, //不美化HTML数据
				items: [
					'source', 'undo', 'redo', '|',
					'fontsize', 'forecolor', 'bold', '|',
					//'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', 'subscript', 'superscript', '|',
					'selectall', 'removeformat', 'clearhtml', '|',
					'hr', 'emoticons', 'image', 'link', 'unlink', 'preview', 'fullscreen', '|', 'about' //'flash', 
				],
				htmlTags: {
					//font: ['color', 'size', 'face', '.background-color'],
					span: ['.font-size', '.color'],// '.font-family', '.background-color'
					a: ['href'],
					//embed: ['src', 'width', 'height', 'type', '/'],
					img: ['src', 'width', 'height', 'alt', 'align', '/'],
					p: ['align'],//'div,p,h1,h2,h3,h4,h5,h6': ['align'],
					'hr,br': ['/'],
					'strong,blockquote': []
				},
				afterChange: function () {
					K('.word_count').html(this.count());
				}
			});
			$(".ke-edit-iframe").on("load", function(){
				var sel = $(this), ifm = sel.contents(), htm = $(".ke-edit,.ke-edit-textarea"), h;
				$(this.contentWindow).on("scroll", function(){
					sel.animate({height: h = ifm.height()}, 100, function(){htm.height(h)});
				});
			});
		});
	})(jQuery);
}
